<%@page import="board.BoardVo"%>
<%@page import="java.util.Vector"%>
<%@page import="board.Board"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script>

</script>
</head>
<body>
<jsp:useBean id="boardVo" class="board.BoardVo"/>
<jsp:setProperty property="*" name="boardVo"/>

<%
	String part="공지사항";
	boardVo.setPart(part);
	
	Board board = new Board();
	board.setVo(boardVo);
	board.setNowPage(boardVo.getNowPage());
	Vector<BoardVo> v= board.list();

	
	out.print("var jsonArray=[");
	
	for(int i=0; i<v.size(); i++){
		BoardVo vo=v.get(i);
		out.print("{mid : \'"	 	+ vo.getMid()		+"\',");
		out.print("subejct : \'" 	+ vo.getSubject()	+"\',");
		out.print("mdate : \'" 		+ vo.getMdate()		+"\',");
		out.print("hit : \'" 		+ vo.getHit()		+"\'}");
		
		if(i<v.size()-1) out.print(",");
	}

	out.print("];");
	
	out.print("var pageInfo={");
	out.print("totPage:\'" 		+ board.getTotPage()	+"\',");
	out.print("startPage:\'" 	+ board.getStartPage()	+"\',");
	out.print("endPage:\'" 		+ board.getEndPage()	+"\'}");
	
	
%>


</body>
</html>